<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8"/>
        <title>el与data的两种写法</title>
        <script type="text/javascript" src="../js/vue.js"></script>
    </head>
    <body>
      
 <!--准备好一个容器-->
 <div id="root">
    <h1>Hello,{{name}}</h1>
 </div>

        <script type="text/javascript">
            Vue.config.productionTip = false; //阻止vue在启动时生成生产提示

            //创建Vue实例
         const vm = new Vue({
                el:'#root',
                data:function(){
                    return {
                        name:'李白'
                    }
                } 
            });
            

        </script>
    </body>
</html>
</html>